<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix = "c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix = "fn" uri = "http://java.sun.com/jsp/jstl/functions"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
			<link rel="stylesheet" href="static/css/bootstrap.min.css" />
			<link rel = "stylesheet" href = "static/css/globle.css"/>
		<title>项目管理系统</title>
		<style type="text/css">
			span{
				color:black;
				font-size:1em;
			}
		</style>
	</head>
	<body>
	
		  <div class="navbar navbar-fixed-top" id = "manager">
			<div class="navbar-inner">
				<div class="container">
					<a  class = "brand" href="#">项目管理系统</a>
			
				</div>
			</div>
		 </div>
		 
		 <div class="container" style = "margin-top:40px">
			<div class="row">
				<div class="span12">
					<div class="page-header">
						<h1>项目列表</h1>
					</div>
					<a href="project.jspx?_m=add" class = "btn btn-success"><i class="icon-plus icon-white"></i>新建一个项目</a>
					
					<c:if test="${fn:length(projectPager.result) == 0 }">
						<div>还没有任何项目，请添加</div>
					</c:if>
					<c:forEach items = "${projectPager.result }" var = "p">
						<ul class="breadcrumb" style = "margin-top:20px;margin-bottom:0px;border-radius:3px 3px 0 0;">
							<li class = "active "> <a href="project.jspx?_m=project&pid=${p.p_id }">${p.p_name}</a></li>
						</ul>
						<div class = "well" style = "border-radius:0 0 3px 3px">
							<p>${p.p_dec }</p>
						</div>
					</c:forEach>
					<a href = "project.jspx?p=1">首页</a>
					<c:choose>
						<c:when test="${projectPager.pagerNum != 1}">
							<a href = "project.jspx?p=${projectPager.pagerNum -1 }">上一页</a>
						</c:when>
						<c:otherwise>
							<span>上一页</span>
						</c:otherwise>
						
					</c:choose>
					<c:choose>
						<c:when test="${projectPager.pagerNum != projectPager.totalPages }">
							<a href = "project.jspx?p=${projectPager.pagerNum + 1 }">下一页</a>
						</c:when>
						<c:otherwise>
							<span>下一页</span>
						</c:otherwise>
					</c:choose>
					<a href = "project.jspx?p=${projectPager.totalPages}">尾页</a>
				</div>
			</div>
		 </div>
		
		
		
	</body>
</html>